using UnityEngine;
using Voodoo.Sauce.Internal.Ads;
using Voodoo.Sauce.Internal.CrossPromo;

namespace Voodoo.Sauce.Internal.IAP
{
	internal static class VoodooPremium
	{
		private const string TAG = "VoodooPremium";

		private const string PrefsPremium = "VoodooSauce.Premium";

		public static void EnablePremium()
		{
			if (IsPremium())
			{
				VoodooLog.LogE("VoodooPremium", "User is already premium, you should not be calling this method more than once, when the user bought your NO ADS in-app product");
				return;
			}
			VoodooLog.Log("VoodooPremium", "User is now PREMIUM");
			PlayerPrefs.SetInt("VoodooSauce.Premium", 1);
			VoodooAds.DisableBannerAndInterstitial();
			VoodooCrossPromo.Hide();
		}

		public static bool IsPremium()
		{
			return PlayerPrefs.GetInt("VoodooSauce.Premium", 0) == 1;
		}
	}
}
